//
//  UIView+XYX.m
//  E-Cycle(XYXMain)
//
//  Created by 象萌cc003a on 17/2/20.
//  Copyright © 2017年 xmcc003a. All rights reserved.
//

#import "UIView+Layout.h"

@implementation UIView (Layout)
-(void)setHeight:(CGFloat)height{
    self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, height);
}

-(CGFloat)height{
    return self.frame.size.height;
}

-(void)setTop:(CGFloat)top{
    self.frame = CGRectMake(self.frame.origin.x, top, self.frame.size.width, self.frame.size.height);
}

-(CGFloat)top{
    return self.frame.origin.y;
}

-(void)setLeft:(CGFloat)left{
    self.frame = CGRectMake(left, self.frame.origin.y, self.frame.size.width, self.frame.size.height);
}

-(CGFloat)left{
    return self.frame.origin.x;
}

-(void)setWidth:(CGFloat)width{
    self.frame = CGRectMake(self.frame.origin.x, self.frame.origin.y, width, self.frame.size.height);
}

-(CGFloat)width{
    return self.frame.size.width;
}

-(void)setWid:(CGFloat)Wid{
    [self setWidth:Wid];
}

-(CGFloat)Wid{
    return self.width;
}

-(CGFloat)right{
    return self.frame.origin.x + self.frame.size.width;
}

-(CGFloat)bottom{
    return self.frame.origin.y + self.frame.size.height;
}


@end
